﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:42:50
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.Sys
{
	/// <summary>
	/// 用户日志
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("用户日志")]
	[BindTable("UserLog", Description = "用户日志", ConnName = "Sys", DbType = DatabaseType.SqlServer)]
	public partial class UserLog
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private String _UserName;
		/// <summary>
		/// 用户名称
		/// </summary>
		[Description("用户名称")]
		[DataObjectField(false, false, false, 200)]
		[BindColumn(2, "UserName", "用户名称", "", "nvarchar(200)", 0, 0, true)]
		public String UserName
		{
			get { return _UserName; }
			set { if (OnPropertyChange("UserName", value)) _UserName = value; }
		}

		private Int32 _LogID;
		/// <summary>
		/// 日志编号
		/// </summary>
		[Description("日志编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "LogID", "日志编号", "", "int", 10, 0, false)]
		public Int32 LogID
		{
			get { return _LogID; }
			set { if (OnPropertyChange("LogID", value)) _LogID = value; }
		}

		private String _IP;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 40)]
		[BindColumn(4, "IP", "地址", "", "nvarchar(40)", 0, 0, true)]
		public String IP
		{
			get { return _IP; }
			set { if (OnPropertyChange("IP", value)) _IP = value; }
		}

		private String _LogType;
		/// <summary>
		/// 日志类型
		/// </summary>
		[Description("日志类型")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(5, "LogType", "日志类型", "", "nvarchar(20)", 0, 0, true)]
		public String LogType
		{
			get { return _LogType; }
			set { if (OnPropertyChange("LogType", value)) _LogType = value; }
		}

		private String _SubType;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 20)]
		[BindColumn(6, "SubType", "", "", "nvarchar(20)", 0, 0, true)]
		public String SubType
		{
			get { return _SubType; }
			set { if (OnPropertyChange("SubType", value)) _SubType = value; }
		}

		private String _LogMessage;
		/// <summary>
		/// 日志消息
		/// </summary>
		[Description("日志消息")]
		[DataObjectField(false, false, true, 400)]
		[BindColumn(7, "LogMessage", "日志消息", "", "nvarchar(400)", 0, 0, true)]
		public String LogMessage
		{
			get { return _LogMessage; }
			set { if (OnPropertyChange("LogMessage", value)) _LogMessage = value; }
		}

		private String _Memo;
		/// <summary>
		/// 注释
		/// </summary>
		[Description("注释")]
		[DataObjectField(false, false, true, 40)]
		[BindColumn(8, "Memo", "注释", "", "nvarchar(40)", 0, 0, true)]
		public String Memo
		{
			get { return _Memo; }
			set { if (OnPropertyChange("Memo", value)) _Memo = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(9, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(10, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(11, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(12, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(13, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "UserName" : return _UserName;
					case "LogID" : return _LogID;
					case "IP" : return _IP;
					case "LogType" : return _LogType;
					case "SubType" : return _SubType;
					case "LogMessage" : return _LogMessage;
					case "Memo" : return _Memo;
					case "AddTime" : return _AddTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "UserName" : _UserName = Convert.ToString(value); break;
					case "LogID" : _LogID = Convert.ToInt32(value); break;
					case "IP" : _IP = Convert.ToString(value); break;
					case "LogType" : _LogType = Convert.ToString(value); break;
					case "SubType" : _SubType = Convert.ToString(value); break;
					case "LogMessage" : _LogMessage = Convert.ToString(value); break;
					case "Memo" : _Memo = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得用户日志字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 用户名称
			///</summary>
			public const String UserName = "UserName";

			///<summary>
			/// 日志编号
			///</summary>
			public const String LogID = "LogID";

			///<summary>
			/// 地址
			///</summary>
			public const String IP = "IP";

			///<summary>
			/// 日志类型
			///</summary>
			public const String LogType = "LogType";

			///<summary>
			/// 
			///</summary>
			public const String SubType = "SubType";

			///<summary>
			/// 日志消息
			///</summary>
			public const String LogMessage = "LogMessage";

			///<summary>
			/// 注释
			///</summary>
			public const String Memo = "Memo";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}